const koa = require("koa")
const router = require("koa-router")()
const app = new koa()

const show = require("./server")
router.get("/search",async ctx=>{
    let {keyword} = ctx.query
    keyword = encodeURIComponent(keyword)
    let data = await show(keyword)
    ctx.body = data
})
app.use(router.routes())
app.listen(8080)